<!Doctype html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>{{title}}</title>
<link href="/static/install.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript" src="/static/install.js"></script>
</head>
<body onload="selectType()">
<!-- start body div -->
<div id="body">
  <!-- start header div -->
  <div id="header">
	<div id="logo"><h2>欢迎使用水滴博客系统</h2></div>
	<div id="desc">
	  <p>
		水滴博客系统是一个使用python语言结合bottle框架编写,并同时支持MySQL和mongodb数据库的一套博客系统,虽然项目刚刚起步,但会逐渐完善,接下来我们将引导你来安装并使用水滴博客系统
	  </p>
	</div>
  </div>
  <!-- end header div -->
  <!-- start main div -->
  <div id="main">
	<!-- start content -->
	<div id="content">
	  <div id="message"></div>
	  <form action="/install/post/" method="post" name="install">
		<div>
		  <div class="name">
			数据库类型
		  </div>
		  <div class="input">
			<select id="db_engine" name="db_engine" onchange="selectType()">
			  <option value="mysql">MySQL</option>
			  <option value="mongo">MongoDB</option>
			</select>
		  </div>
		  <small>水滴支持两种数据库</small>
		</div>
		<div>
		  <div class="name">数据库主机</div>
		  <div class="input">
			<input id="db_host" name="db_host" type="text" value="localhost" />
		  </div>
		</div>
		<div>
		  <div class="name">数据库端口</div>
		  <div class="input">
			<input id="db_port" name="db_port" type="text" value="3306" />
		  </div>
		</div>
		<div id="auth" style="display:none">
		  <div class="name">是否需要认证</div>
		  <div class="input">
			<input type="checkbox" name="isauth" onclick="onShow()" />
		  </div>
		  <small>MongoDB是否开启认证</small>
		</div>
		<div style="display:inline">
		  <div class="name">
			数据库用户
		  </div>
		  <div class="input">
			<input type="text" name="db_user" value="" />
		  </div>
		</div>
		<div>
		  <div class="name" style="display:inline">数据库密码</div>
		  <div class="input">
			<input type="password" name="db_passwd" value="" />
		  </div>
		</div>
		<div>
		  <div class="name">数据库名称</div>
		  <div class="input">
			<input type="text" name="db_name" value="blog" />
		  </div>
		</div>
		<div  id="mongo_auth" style="display:none">
		  <div class="name">认证数据库</div>
		  <div class="input">
			<input type="text" name="auth_db" value="admin" />
		  </div>
		  <small>MongoDB可以使用当前库做当前验证,也可使用admin做全局验证</small>
		</div>
		<hr>
		<div>
		  <div class="name">管理员名称</div>
		  <div class="input">
			<input type="text" name="username" value="" />
		  </div>
		</div>
		<div>
		  <div class="name">管理员密码</div>
		  <div class="input">
			<input type="password" name="password" value="" />
		  </div>
		</div>
		<div>
		  <div class="name">重复密码</div>
		  <div class="input">
			<input type="password" name="retypepass" value="" />
		  </div>
		</div>
		<div>
		  <div class="name">管理员邮箱</div>
		  <div class="input">
			<input type="text" name="email" value="" />
		  </div>
		</div>
		<hr />
		<div>
		  <div class="name">博客名称</div>
		  <div class="input">
			<input type="text" name="blog_name" value="" />
		  </div>
		</div>
		<div>
		  <div class="name">博客描述</div>
		  <div class="input">
			<input type="text" name="subtitle" value="" />
		  </div>
		</div>
		<div class="center">		  
		  <input type="button" name="submit" onclick="Send()" value="安装" />
		  <input type="reset" name="reset" value="重置" />
		</div>
	  </form>
	</div>
	<!-- end content -->	
  </div>
  <!-- end main div -->
  %include footer.html
</div>
<!-- end body div -->
</body>
</html>
